package com.newegg.sshd.command;

import com.beust.jcommander.Parameter;
import com.newegg.sshd.AbstractCommand;

public class Ll extends AbstractCommand{

	@Parameter(names = {"-l", "--list"}, description = "List")
    boolean list = true;

	public String help() {
		return "Usage: ls [OPTION]... [FILE]...\r\n" + 
				"List information about the FILEs (the current directory by default).\r\n" + 
				"Sort entries alphabetically if none of -cftuvSUX nor --sort is specified.\r\n" + 
				"\r\n" + 
				"Mandatory arguments to long options are mandatory for short options too.\r\n" + 
				"  -a, --all                  do not ignore entries starting with .\r\n" + 
				"  -A, --almost-all           do not list implied . and ..\r\n" + 
				"      --author               with -l, print the author of each file\r\n" + 
				"  -b, --escape               print C-style escapes for nongraphic characters\r\n" + 
				"      --block-size=SIZE      scale sizes by SIZE before printing them; e.g.,\r\n" + 
				"                               '--block-size=M' prints sizes in units of\r\n" + 
				"                               1,048,576 bytes; see SIZE format below\r\n" + 
				"  -B, --ignore-backups       do not list implied entries ending with ~\r\n" + 
				"  -c                         with -lt: sort by, and show, ctime (time of last\r\n" + 
				"                               modification of file status information);\r\n" + 
				"                               with -l: show ctime and sort by name;\r\n" + 
				"                               otherwise: sort by ctime, newest first\r\n" + 
				"  -C                         list entries by columns\r\n" + 
				"      --color[=WHEN]         colorize the output; WHEN can be 'never', 'auto',\r\n" + 
				"                               or 'always' (the default); more info below\r\n" + 
				"  -d, --directory            list directories themselves, not their contents\r\n" + 
				"  -D, --dired                generate output designed for Emacs' dired mode\r\n" + 
				"  -f                         do not sort, enable -aU, disable -ls --color\r\n" + 
				"  -F, --classify             append indicator (one of */=>@|) to entries\r\n" + 
				"      --file-type            likewise, except do not append '*'\r\n" + 
				"      --format=WORD          across -x, commas -m, horizontal -x, long -l,\r\n" + 
				"                               single-column -1, verbose -l, vertical -C\r\n" + 
				"      --full-time            like -l --time-style=full-iso\r\n" + 
				"  -g                         like -l, but do not list owner\r\n" + 
				"      --group-directories-first\r\n" + 
				"                             group directories before files;\r\n" + 
				"                               can be augmented with a --sort option, but any\r\n" + 
				"                               use of --sort=none (-U) disables grouping\r\n" + 
				"  -G, --no-group             in a long listing, don't print group names\r\n" + 
				"  -h, --human-readable       with -l, print sizes in human readable format\r\n" + 
				"                               (e.g., 1K 234M 2G)\r\n" + 
				"      --si                   likewise, but use powers of 1000 not 1024\r\n" + 
				"  -H, --dereference-command-line\r\n" + 
				"                             follow symbolic links listed on the command line\r\n" + 
				"      --dereference-command-line-symlink-to-dir\r\n" + 
				"                             follow each command line symbolic link\r\n" + 
				"                               that points to a directory\r\n" + 
				"      --hide=PATTERN         do not list implied entries matching shell PATTERN\r\n" + 
				"                               (overridden by -a or -A)\r\n" + 
				"      --indicator-style=WORD  append indicator with style WORD to entry names:\r\n" + 
				"                               none (default), slash (-p),\r\n" + 
				"                               file-type (--file-type), classify (-F)\r\n" + 
				"  -i, --inode                print the index number of each file\r\n" + 
				"  -I, --ignore=PATTERN       do not list implied entries matching shell PATTERN\r\n" + 
				"  -k, --kibibytes            default to 1024-byte blocks for disk usage\r\n" + 
				"  -l                         use a long listing format\r\n" + 
				"  -L, --dereference          when showing file information for a symbolic\r\n" + 
				"                               link, show information for the file the link\r\n" + 
				"                               references rather than for the link itself\r\n" + 
				"  -m                         fill width with a comma separated list of entries\r\n" + 
				"  -n, --numeric-uid-gid      like -l, but list numeric user and group IDs\r\n" + 
				"  -N, --literal              print raw entry names (don't treat e.g. control\r\n" + 
				"                               characters specially)\r\n" + 
				"  -o                         like -l, but do not list group information\r\n" + 
				"  -p, --indicator-style=slash\r\n" + 
				"                             append / indicator to directories\r\n" + 
				"  -q, --hide-control-chars   print ? instead of nongraphic characters\r\n" + 
				"      --show-control-chars   show nongraphic characters as-is (the default,\r\n" + 
				"                               unless program is 'ls' and output is a terminal)\r\n" + 
				"  -Q, --quote-name           enclose entry names in double quotes\r\n" + 
				"      --quoting-style=WORD   use quoting style WORD for entry names:\r\n" + 
				"                               literal, locale, shell, shell-always, c, escape\r\n" + 
				"  -r, --reverse              reverse order while sorting\r\n" + 
				"  -R, --recursive            list subdirectories recursively\r\n" + 
				"  -s, --size                 print the allocated size of each file, in blocks\r\n" + 
				"  -S                         sort by file size\r\n" + 
				"      --sort=WORD            sort by WORD instead of name: none (-U), size (-S),\r\n" + 
				"                               time (-t), version (-v), extension (-X)\r\n" + 
				"      --time=WORD            with -l, show time as WORD instead of default\r\n" + 
				"                               modification time: atime or access or use (-u)\r\n" + 
				"                               ctime or status (-c); also use specified time\r\n" + 
				"                               as sort key if --sort=time\r\n" + 
				"      --time-style=STYLE     with -l, show times using style STYLE:\r\n" + 
				"                               full-iso, long-iso, iso, locale, or +FORMAT;\r\n" + 
				"                               FORMAT is interpreted like in 'date'; if FORMAT\r\n" + 
				"                               is FORMAT1<newline>FORMAT2, then FORMAT1 applies\r\n" + 
				"                               to non-recent files and FORMAT2 to recent files;\r\n" + 
				"                               if STYLE is prefixed with 'posix-', STYLE\r\n" + 
				"                               takes effect only outside the POSIX locale\r\n" + 
				"  -t                         sort by modification time, newest first\r\n" + 
				"  -T, --tabsize=COLS         assume tab stops at each COLS instead of 8\r\n" + 
				"  -u                         with -lt: sort by, and show, access time;\r\n" + 
				"                               with -l: show access time and sort by name;\r\n" + 
				"                               otherwise: sort by access time\r\n" + 
				"  -U                         do not sort; list entries in directory order\r\n" + 
				"  -v                         natural sort of (version) numbers within text\r\n" + 
				"  -w, --width=COLS           assume screen width instead of current value\r\n" + 
				"  -x                         list entries by lines instead of by columns\r\n" + 
				"  -X                         sort alphabetically by entry extension\r\n" + 
				"  -1                         list one file per line\r\n" + 
				"\r\n" + 
				"SELinux options:\r\n" + 
				"\r\n" + 
				"  --lcontext                 Display security context.   Enable -l. Lines\r\n" + 
				"                             will probably be too wide for most displays.\r\n" + 
				"  -Z, --context              Display security context so it fits on most\r\n" + 
				"                             displays.  Displays only mode, user, group,\r\n" + 
				"                             security context and file name.\r\n" + 
				"  --scontext                 Display only security context and file name.\r\n" + 
				"      --help     display this help and exit\r\n" + 
				"      --version  output version information and exit\r\n" + 
				"\r\n" + 
				"SIZE is an integer and optional unit (example: 10M is 10*1024*1024).  Units\r\n" + 
				"are K, M, G, T, P, E, Z, Y (powers of 1024) or KB, MB, ... (powers of 1000).\r\n" + 
				"\r\n" + 
				"Using color to distinguish file types is disabled both by default and\r\n" + 
				"with --color=never.  With --color=auto, ls emits color codes only when\r\n" + 
				"standard output is connected to a terminal.  The LS_COLORS environment\r\n" + 
				"variable can change the settings.  Use the dircolors command to set it.\r\n" + 
				"\r\n" + 
				"Exit status:\r\n" + 
				" 0  if OK,\r\n" + 
				" 1  if minor problems (e.g., cannot access subdirectory),\r\n" + 
				" 2  if serious trouble (e.g., cannot access command-line argument).\r\n" + 
				"\r\n" + 
				"GNU coreutils online help: <http://www.gnu.org/software/coreutils/>\r\n" + 
				"For complete documentation, run: info coreutils 'ls invocation'\r\n" + 
				"";
	}
	
	@Override
	public String run() {
		return "total 12\r\n" + 
				"drwxr-xr-x  1 fy07 fy07 4096 May 17  2019 ./\r\n" + 
				"drwxr-xr-x  1 root root 4096 May 17  2019 ../\r\n" + 
				"-rw-------  1 fy07 fy07 1286 Nov 15 09:12 .bash_history\r\n" + 
				"-rw-r--r--  1 fy07 fy07  220 May 17  2019 .bash_logout\r\n" + 
				"-rw-r--r--  1 fy07 fy07 3771 May 17  2019 .bashrc\r\n" + 
				"-rw-r--r--  1 fy07 fy07  807 May 17  2019 .profile\r\n" + 
				"-rw-r--r--  1 fy07 fy07    0 May 17  2019 .sudo_as_admin_successful\r\n" +
				"drwx------  3 centos centos  74 May 15  2019 centos\r\n" + 
				"drwx------  3 sadmin sadmin  74 Jul 18  2019 sadmin\r\n" + 
				"drwx------  2 salmon salmon  62 May 15  2019 salt\r\n" + 
				"drwx------  2 salmon salmon  67 May 15  2019 app\r\n" + 
				"drwx------  2 salmon salmon  74 May 15  2019 Movie\r\n" + 
				"drwx------  2 salmon salmon  74 May 15  2019 Music\r\n";
	}
}
